package com.mars.dubbo;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;


/**
 * 启动Dubbo服务用的MainClass.
 * 
 * @作者：杨浩泉
 * @时间：2016年11月13日
 * @版本： v1.0
 *
 */
public class ManagerDubboProvider {
	
	private static final Log log = LogFactory.getLog(ManagerDubboProvider.class);

	public static void main(String[] args) {
		try {
			new ClassPathXmlApplicationContext("classpath:spring-context.xml").start();
		} catch (Exception e) {
			log.error("== DubboProvider context start error:",e);
		}
		synchronized (ManagerDubboProvider.class) {
			while (true) {
				try {
					ManagerDubboProvider.class.wait();
				} catch (InterruptedException e) {
					log.error("== synchronized error:",e);
				}
			}
		}
	}
    
}